package cn.newgrand.netcall.consultant.components;

import java.awt.Component;

import javax.swing.JOptionPane;

public class SpecialistStatusMessage {
	
	/**
	 * @author fangt
	 *
	 */
	public enum SpecResultAndStatus{
		//////status
		/**
		 * 可以加入队列
		 */
		yes,
		/**
		 * 不能加入队列
		 */
		no,
		
		
		/////result
		/**
		 * 队列已满
		 */
		busy,
		/**
		 * 重复加入队列
		 */
		repeat,
		/**
		 * 专家离线
		 */
		offline,
		/**
		 * 专家不存在
		 */
		noexist,
		/**
		 * 专家咨询者为同一人
		 */
		sameone
	}
	
	
	public static void showSpecialistResult(Component parent,SpecResultAndStatus status){
		
		switch(status){
		case yes:
			JOptionPane.showMessageDialog(parent, "加入成功");
			return;
		case no:
			//JOptionPane.showMessageDialog(parent, "加入成功");
			return;
		case busy:
			JOptionPane.showMessageDialog(parent, "专家正忙，队列已满");
			return;
		case repeat:
			JOptionPane.showMessageDialog(parent, "重复加入队列");
			return;
		case offline:
			JOptionPane.showMessageDialog(parent, "专家不在线");
			return;
		case noexist:
			JOptionPane.showMessageDialog(parent, "专家不存在");
			return;
		case sameone:
			JOptionPane.showMessageDialog(parent, "不能加入自己队列");
			return;
		default:
			JOptionPane.showMessageDialog(parent, "无法加入队列");
				return;
		}
		
	}

}
